<?php
namespace app\admin\controller;
use think\Controller;
use app\admin\Model\Message;
use app\admin\Model\User as User1;
use app\admin\Model\Pay;
use think\Db;
use app\admin\validate\Stu as qbc;

class User extends Common
{
	
	public function list(){
		
		$list = User1::paginate(4);
		$page = $list->render();
	     //halt($list);
		
		return $this->fetch('list',['list'=>$list,'page'=>$page]);
	}
	public function add(){
		$use = new user1();
			
		if(input("?param.sub")){
			
			
			$result = $use->add();
			if($result){
				$this->success("添加成功","user/list");
			}else{
				$this->error("添加失败");
			}
		}else{
			return $this->fetch("add",[]);
		}
	}
	

}
?>